package com.wx.lambda.ii.chapter7;

import com.wx.lambda.ii.chapter4.Chapter4Test;
import com.wx.lambda.ii.chapter4.Dish;
import lombok.extern.slf4j.Slf4j;

import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

import static java.util.Comparator.comparingInt;
import static java.util.stream.Collectors.*;


/**
 * 第六章测试
 */
@Slf4j
public class Chapter7Test {
    public static void main(String[] args) {
        Long reduce = Stream.iterate(0L, i -> i + 1L).parallel().limit(9999999L).reduce(0L, Long::sum);
        log.info("reduce={}", reduce);
    }


}
